

import org.junit.Test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @Author leiHua
 * @Date 2022/11/12 16:39
 */
public class JDBCconn {
    private static Connection conn = null;
    @Test
    public void testConn() throws ClassNotFoundException, SQLException {
            Class.forName("com.mysql.jdbc.Driver");
            String url = "jdbc:mysql://localhost:3306/javaeelab";
            conn = DriverManager.getConnection(url, "root", "root");
            System.out.println(conn);

    }
}


